import request from '@/utils/request'

export default{
    //码值列表（条件查询分页）
    //current当前页 limit每页记录数 
    getCodeLibraryListPage(current,limit,queryForm){
        return request({
            url: `/accounts/code-library/findAll/${current}/${limit}`,
            method: 'post',
            data: queryForm
          })
    },
    findAllByCode(codeType){
        return request({
            url: `/accounts/code-library/findAllByCode/${codeType}`,
            method: 'get'
        })
    },
    appendCode(CLForm){
        return request({
            url: '/accounts/code-library/save',
            method: 'post',
            data: CLForm
        })
    },
    // 通过数据库中字段删除
    removeById(id){
        return request({
            url: `/accounts/code-library/deleteData/${id}`,
            method: 'delete'
        })
    },
    update(CLForm){
        return request({
            url: '/accounts/code-library/update',
            method: 'put',
            data: CLForm
        })
    }
    
}
